<?php include 'product_detail_css_js.php'; ?>

<script type="text/javascript">
    $(function() {
        $('#container-1 > ul').tabs();
    });
    function activeTab(strTab) {
        var $tabs = $('#container-1 > ul').tabs();
        $tabs.tabs('select',strTab);
        return false;
    }
    var AppRoot = "";

    function OnFailed(args)
    {
        return '';
    }
</script>

<script type="text/javascript">
    jQuery(document).ready(function() {
        jQuery('#product').j360();
    });
</script>


<center>

    <div class="div_content_all">

        <?php include dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'cache_html' . DIRECTORY_SEPARATOR . 'top_menu.php'; ?>

        <div class="clear"></div>

        <div id="breadcrumb">
            <div id="sub-menu" class="fl">


            </div>
            <div class="fr callcenter">
                &nbsp;
            </div>
            <div class="clear">

            </div>
        </div>

        <div id="content-detail">
            <div class="div_top_right_box2_n">
                <div class="div_top_left_box2_n">
                    <div class="div_top_center_box2_n">
                        <div class="div_top_title">

                            <div style="float: left;">
                                <a class="Home" href="<?php echo $root_page;?>" title="Trang chủ">Trang chủ</a><span> &gt; </span>
                                <?php foreach ($categoryParent as $key => $value) { ?>
                                    <?php if($key > 0){?>
                                        <span> &gt; </span>
                                    <?php } ?>
                                        <a href="<?php echo $root_page;?>/danhmuc/<?php echo $value['category_id'];?>/<?php echo $value['category_name_filter'];?>.html" title="<?php echo $value['category_name'];?>"><?php echo $value['category_name'];?></a>
                                    <?php $catId = $value['category_id']; $catFilterName = $value['category_name_filter'];?>
                                <?php } ?>
                                    <span> &gt; </span>
                                    <a href="<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>/<?php echo $aryProduct['product_maker_name_filter'];?>/" title="<?php echo $aryProduct['product_maker_name'];?>"><?php echo $aryProduct['product_maker_name'];?></a>
                                    

                            </div>
                            <div class="div_top_title_view">
                                
                                Cập nhật từ ngày <?php echo date('d/m/Y', strtotime($aryProduct['product_updated_date']));?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="div_content_right">
                <div class="div_content_left">
                    <div class="div_center_for_all">
                        <div class="div_float">
                            <div class="div_left_content_detail">
                                <div class="div_float_detail">
                                    <div class="div_image_detail">
                                        <div class="div_image">
                                            <div class="divvalign">

                                                <div class="divvalign2">

                                                    <img id="imgProduct" onclick="ShowModalImage('46321','0','MultiImage');"  src="<?php echo $sub_domain;?>/images/upload/small/<?php echo $aryProduct['product_small_image']; ?>" alt="<?php echo $aryProduct['product_title']; ?>"/>

                                                </div>
                                            </div>
                                        </div>
                                        <div class="div_view_image">

                                            <span class="sp_m_image" onclick="ShowModalImage('46321','0','MultiImage');">
                                                Xem nhiều hình</span>


                                            <span onclick="OpenPopup('mpRota');" class="sp_m_rota">Xoay 360</span>

                                        </div>
                                    </div>
                                    <div class="div_content_left_topdetail">
                                        <div class="product_name">
<!--                                           haimv add google plus button-->
                                            <g:plusone></g:plusone>                                            
<!--                                                <a title="Chia sẻ với bạn bè trên facebook" style="text-decoration:none;" target="_blank" class="fb_share_button" href="http://www.facebook.com/sharer/sharer.php?u=<?php echo $aryProduct['product_title'];?>">Share</a>      
                                                <a title="Chia sẻ với bạn bè trên Twitter" style="text-decoration:none;" target="_blank" class="twitter_share_button" href="http://twitter.com/intent/tweet?source=webclient&text=<?php echo $aryProduct['product_title'];?>">Share Twitter</a>      -->
                                            
                                                <div style="margin-bottom:5px">
<!--                                                    <script src="/js/share.js" language="javascript"></script>-->
                                                    <a target="_blank" href="http://www.facebook.com/sharer.php?u=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html">
                                                        <img border="0" align="absmiddle" title="Facebook" src="<?php echo $sub_domain;?>/images/them1/icon_chat/facebook.png"/>
                                                    </a> <a target="_blank" href="http://twitter.com/home?status=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html">
                                                        <img border="0" align="absmiddle" title="Twitter" src="<?php echo $sub_domain;?>/images/them1/icon_chat/twitter.png"/>
                                                    </a> <a target="_blank" href="https://www.google.com/bookmarks/mark?op=add&amp;bkmk=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html&amp;title=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html">
                                                        <img border="0" align="absmiddle" title="Google Bookmark" src="<?php echo $sub_domain;?>/images/them1/icon_chat/google.png"/>
                                                    </a> <a target="_blank" href="http://del.icio.us/post?v=2&amp;url=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html&amp;notes=&amp;tags=&amp;title=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html">
                                                        <img border="0" align="absmiddle" title="Delicious" src="<?php echo $sub_domain;?>/images/them1/icon_chat/delicious.png"/></a>
                                                    <a target="_blank" href="http://digg.com/submit?phase=2&amp;url=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html&amp;title=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html">
                                                        <img border="0" align="absmiddle" title="Digg" src="<?php echo $sub_domain;?>/images/them1/icon_chat/digg.png"/>
                                                    </a> 
                                                    <a rel="nofollow" target="_blank" href="http://www.myspace.com/index.cfm?fuseaction=postto&amp;u=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html">
                                                        <img border="0" align="absmiddle" title="Digg" src="<?php echo $sub_domain;?>/images/them1/icon_chat/mySpace.jpg"/>
                                                    </a>
                                                    <a rel="nofollow" target="_blank" href="http://linkhay.com/submit?link_url=<?php echo $root_page;?>/danhmuc/<?php echo $catId;?>/<?php echo $catFilterName?>.html">
                                                        <img border="0" align="absmiddle" title="Digg" src="<?php echo $sub_domain;?>/images/them1/icon_chat/btn_linkhay.gif"/>
                                                    </a>
                                                </div>
                                            
                                            <div>
                                                <?php echo $aryProduct['product_title']; ?>
                                            </div>
                                        </div>

                                        <div class="div_r_p_d">
                                            <?php if($aryProduct['product_price_active_km'] == 1){?>
                                            <div class="div_price_detail">
                                                <div>
                                                    <span class="t_price">Giá cũ: </span><span class="t_price_old"><?php echo number_format($aryProduct['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ</span>
                                                </div>
                                                <div>
                                                    <span class="t_price">Giá mới: </span><span class="p_price"><?php echo number_format($aryProduct['product_price_vnd_km'], 0, ',', '.'); ?></span><span class="p_unit">VNĐ</span><span class="sp_hint"><?php echo ($aryProduct['product_is_vat'] == 1) ? '(Đã bao gồm VAT)' : '(Chưa bao gồm VAT)'; ?></span>
                                                </div>
                                            </div>
                                            <?php }else{ ?>
                                                <div class="div_price_detail">
                                                    <span class="t_price">Giá bán: </span><span class="p_price"><?php echo number_format($aryProduct['product_price_vnd'], 0, ',', '.'); ?></span><span class="p_unit">VNĐ</span><span class="sp_hint"><?php echo ($aryProduct['product_is_vat'] == 1) ? '(Đã bao gồm VAT)' : '(Chưa bao gồm VAT)'; ?></span>
                                                </div>
                                            <?php }?>

                                            <div class="div_item_detail">
                                                <?php echo $aryProduct['product_store_name']; ?>
                                            </div>

                                            <div class="div_item_detail">
                                                Màu sản phẩm:

                                            </div>

                                            <div class="div_order_detail" id="divPreOrder">
                                                <?php echo $aryProduct['product_highlight']; ?>
                                            </div>
                                            
                                            <div class="div_bottom_sale">
                                                <?php if(in_array($aryProduct['product_id'], $aryOrderProductId)){?>
                                                <div>
                                                    Sản phẩm đã có trong giỏ hàng.
                                                </div>
                                                <div>
                                                    <a href="<?php echo $root_page;?>/order/chi-tiet-gio-hang.html">Xem giỏ hàng</a>
                                                </div>
                                                <?php }else{ ?>
                                                    <div style="float: left; padding-top: 5px;">
                                                        <div id="product_order_<?php echo $aryProduct['product_id'];?>">
                                                            <input type="button" class="btn_sales_detail" value="&nbsp;" onclick="MyController.addProductToShopCat(<?php echo $aryProduct['product_id']?>, <?php echo $aryProduct['product_category_id'];?>);">
                                                        </div>
                                                    </div>
                                                <?php } ?>
                                                

                                            </div>

                                            <div style="clear: both">
                                            </div>
                                            
                                        </div>
                                    </div>
                                </div>

                            </div>
                            <div class="div_right_content_detail">
                                <div class="div_float_detail">
                                    <div class="div_brand_detail">
                                        <img src="<?php echo $sub_domain;?>/images/upload/thumbnail/<?php echo $aryProduct['product_maker_main_logo']; ?>"/>
                                    </div>
                                    <div class="div_r_float">
                                        <div class="div_r_l">

                                            <?php if($aryProduct['product_promotional'] != '') {?>
                                                <div class="div_t_promotion">
                                                    Khuyến mãi dành cho sản phẩm
                                                </div>
                                                <div class="div_r_toolkit_detail">
                                                    <div class="div_bullet_red_detail"><?php echo $aryProduct['product_promotional']; ?></div>
                                                    <div>
                                                        <span class="sp_df_dt"><?php if($aryProduct['product_promotional_from'] != '0000-00-00 00:00:00'){ echo '('.($aryProduct['product_promotional_from'] != '0000-00-00 00:00:00') ? date('d/m/Y', strtotime($aryProduct['product_promotional_from'])) : ''; ?>-<?php echo ($aryProduct['product_promotional_to'] != '0000-00-00 00:00:00') ? date('d/m/Y', strtotime($aryProduct['product_promotional_to'])).')' : ''; }?></span>
                                                    </div>
                                                </div>
                                            <?php }?>
                                            <?php if($aryProduct['product_full_box'] != '') {?>
                                                <div class="div_r_toolkit_detail">
                                                    <div class="div_tookit_title">Bộ hàng chuẩn:</div><div class="div_tookit_content"><?php echo $aryProduct['product_full_box']; ?></div>
                                                </div>
                                            <?php }?>
                                            
                                            <div class="div_r_toolkit_detail">

                                                <div class="div_tookit_title">
                                                    Bảo hành <?php echo $aryProduct['product_warranty_name']; ?>
                                                    , <a onclick="activeTab('#fragment-warranty');" href="#detail-info" title="Xem chính sách bảo hành">Xem chính sách bảo hành</a>
                                                </div>
                                            </div>

                                            <div class="div_r_warranty_detail">
                                                <div class="div_tookit_title">
                                                    <?php echo $aryProduct['product_transportation_name']; ?>, 
                                                    <a href="<?php echo $root_page;?>/tintuc/" title="Xem hướng dẫn mua hàng">Xem hướng dẫn mua hàng</a>
                                                </div>
                                            </div>
                                            <div style="padding-top: 20px;" align="center">
                                                <?php if($aryCustomer['customer_id'] == '') {?>
                                                <a class="cpointer" onclick="MyController.overlayLogin();"><img style="vertical-align: middle;" src="<?php echo $sub_domain;?>/images/maccathue/button_mct.png"></a>
                                                <?php }else{ ?>
                                                <a class="cpointer" onclick="MyController.sendLinkPrice('<?php echo $aryProduct['product_title'];?> - Giá:&nbsp;<?php echo number_format($aryProduct['product_price_vnd'], 0, ',', '.').'&nbsp;VNĐ'?>', <?php echo $aryProduct['product_id'];?>);" title="Bạn muốn mua sản phẩm với giá rẻ hơn?"><img style="vertical-align: middle;" src="<?php echo $sub_domain;?>/images/maccathue/button_mct.png"></a>
                                                <?php } ?>
                                            </div>

                                        </div>
                                        <div class="div_r_r">
                                            <div class="support_header" style="font-size: 12px;font-weight: bold;padding-bottom: 5px;">
                                                Hỗ trợ bán hàng
                                            </div>
                                            <?php foreach ($arySupport as $key => $value) {?>
                                            <div style="padding-top: 4px;overflow: hidden;">
                                                <div class="list_support_name" style="float: left;">
                                                    <span style="color:#3A89B4;"><?php echo $value['name'];?></span><span style="margin-left: 1px;"></span>
                                                </div>
                                                <div class="list_support_ya" style="float: right;">
                                                    <a href="ymsgr:sendIM?<?php echo $value['yahoo'];?>&m=Xin chào! Tôi muốn hỏi về sản phẩm:  <?php echo $aryProduct['product_title']; ?>"><img border="0" align="absmiddle" src="http://opi.yahoo.com/online?u=<?php echo $value['yahoo'];?>&amp;m=g&amp;t=1"></a>
                                                </div>
                                            </div>
                                                
                                            <?php } ?>
                                        </div>
                                    </div>
                                    <div class="clear">
                                    </div>

                                </div>
                            </div>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                </div>
            </div>
            <div class="div_bottom_left">

                <div class="div_bottom_right">
				
                    <div class="div_bottom_center">
                    </div>
					
                </div>
            </div>
			
        </div>
        
        <div class="clear"></div>
        <div class="div_height">
        </div>
        <div id="left-col-detail">


            <div id="container-1">
                <ul class="ui-tabs-nav">

                    <li><a href="#fragment-detail"><span>Chi tiết tính năng</span></a></li>

                    <li><a href="#fragment-news"><span>Xem bài viết</span></a></li>

<!--                    <li><a href="#fragment-clip"><span>&nbsp;&nbsp;Video Clip&nbsp;&nbsp;</span></a></li>-->

<!--                    <li><a href="#fragment-warranty"><span>Điểm bảo hành</span></a></li>-->

<!--                    <li><a href="#fragment-userguide"><span>Hướng dẫn sử dụng</span></a></li>-->

<!--                    <li><a href="#fragment-stock"><span>Siêu thị bán hàng</span></a></li>-->

                    <li><a href="#fragment-comments"><span>Ý kiến bạn đọc</span></a></li>


                </ul>
                <div class="box_main_all">
                    <div class="box2_in_center">
                        <div class="bor_right">
                            <div class="bor_left">
                                <div class="no_bor_content">
                                    <div id="fragment-detail">
                                        <div class="box_top_content">
                                                <?php include 'product_specs_detail.php'?>
                                        </div>
                                        <div class="div_keyword">

                                        </div>

                                    </div>

                                    <div id="fragment-news">
                                        <div class="news_pro_content">
                                               <td class="specs_item_header">
                                                <?php 
                                                if ($aryProduct['product_content']){
                                                echo $aryProduct['product_content'];}
                                            else {
                                                echo "Chưa có bài viết liên quan!";
}?>
                                               </td>
                                        </div>
                                    </div>



                                    <div id="fragment-comments">
                                        <div class="news_pro_content">
                                               <td class="specs_item_header">
                                                    <?php include 'product_detail_comments.php'?>
                                               </td>
                                        </div>
                                    </div>

                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="box2_in_bottom">
                        <div class="bor_bot_right">

                            <div class="bor_bot_left">
                                <div class="bor_bot_center">
                                    &nbsp;
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="div_height">
            </div>
        </div>
        <div id="right-col-detail">
            <div class="div_height">
            </div>
            <?php include 'product_right_item_top_3.php'; ?>
        </div>
        <div class="clear"></div>
    </div>
</center>
<div class="clear"></div>
<?php include 'home_footer.php'; ?>

